/*
 * Main.cpp
 *
 *  Created on: 25 nov. 2012
 *      Author: guegan
 */

#include "Robot.h"
#include "AfficheurEnConsole.h"
#include "Position.h"
#include "Obstacle.h"
#include "Objet.h"
#include "Robot.h"
#include "EnRoute.h"
#include "Invocateur.h"
#include <iostream>

using namespace std;

int main(int argc, char* argv[]) {
	Robot bot("N", 5, 5);
	Obstacle obs(50);
	Objet obj(42);

	AfficheurEnConsole aff(&bot);
	bot.attacherAfficheur(&aff);

	Invocateur botInv("commandes.txt", &bot);

	botInv.analyser();
	cout << endl << endl;
	botInv.executer();



	/*bot.rencontrerObstacle(obs);

	try {
		bot.tourner("SUD");
	} catch (EtatRobot::TournerException) {
		cout << "Etat::NePeutPasTournerException recuperee" << endl << endl;
	}

	bot.saisir(obj);

	try {
		bot.saisir(obj);
	} catch (EtatRobot::SaisirException) {
		cout << "Etat::NePeutPasSaisirException recuperee" << endl << endl;
	}


	bot.tourner("O");
	bot.avancer(1,5);

	bot.rencontrerObstacle(obs);
	bot.figer();

	try {
		bot.poser();
	} catch (EtatRobot::PoserException) {
		cout << "Etat::NePeutPasPoserException recuperee" << endl << endl;
	}

	bot.repartir();
	bot.poser();
	bot.tourner("E");
	*/

}
